package test_unitaire;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

import buisness_service.Finance_annee;
import buisness_service.Finance_jour;
import buisness_service.Finance_mois;
import buisness_service.Rapport;
import buisness_service.Rapport.Mois;
import buisness_service.User;

public class test_Depense_Mois {

	@Test
	public void testDepense_mois() {

		User u = new User();
		Finance_annee f_a = new Finance_annee(2012,u.getRapport());
		Finance_mois f = new Finance_mois(Mois.Avril, f_a,u);
		Finance_jour f_j = new Finance_jour(28,f,u);
		assertTrue(f.getDep_mois().getFinance_mois() == f);
		assertTrue(u.getRapport().get(0).getDepense_annee()
				.getDepenses_mois().get(0) == f.getDep_mois());
		assertTrue(f.getDep_mois().getDepenses_jour().get(0) ==f_j.getDep_jour());
	
		Rapport.postesDpenses.clear();
		Rapport.postesRevenus.clear();
	}

}
